package com.siyu.tickets.web;

import com.siyu.tickets.entity.SysUser;

public class ThreadVariable {
	/**
	 * 当前用户线程变量
	 */
	private static ThreadLocal<SysUser> userVariable = new ThreadLocal<SysUser>();

	/**
	 * 获得当前用户
	 * 
	 * @return
	 */
	public static SysUser getUser() {
		return userVariable.get();
	}

	/**
	 * 设置当前用户
	 * 
	 * @param user
	 */
	public static void setUser(SysUser user) {
		userVariable.set(user);
	}

	/**
	 * 移除当前用户
	 */
	public static void removeUser() {
		userVariable.remove();
	}

	/**
	 * 获得当前站点
	 * 
	 * @return
	 */
	/*
	public static CmsSite getSite() {
	return cmsSiteVariable.get();
	}

	*//**
	 * 设置当前站点
	 * 
	 * @param site
	 */
	/*
	public static void setSite(CmsSite site) {
	cmsSiteVariable.set(site);
	}

	*//**
	 * 移除当前站点
	 */
	/*
	public static void removeSite() {
	cmsSiteVariable.remove();
	}

	*//**
	 * 获得当前站点敏感词线程变量
	 * 
	 * @return
	 */
	/*
	public static List<CmsSensitivity> getSensitivityList() {
	return cmsSensitivityVariable.get();
	}

	*//**
	 * 设置当前站点敏感词
	 * 
	 * @param cmsSensitivityList
	 */
	/*
	public static void setSensitivityList(List<CmsSensitivity> sensitivityList) {
	cmsSensitivityVariable.set(sensitivityList);
	}

	*//**
	 * 移除当前站点敏感词
	 */
	/*
	public static void removeSensitivityList() {
	cmsSensitivityVariable.remove();
	}*/
}